package com.youlin.service;

import com.youlin.dto.BaseDataResDto;
import com.youlin.dto.BaseResDto;
import com.youlin.dto.PageDataResDto;
import com.youlin.dto.PageInfo;
import com.youlin.dto.req.AddAdminReqDto;
import com.youlin.dto.res.AdminResDto;
import com.youlin.dto.res.EditAdminResDto;
import com.youlin.entities.BygAdmin;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.security.core.userdetails.UserDetailsService;

import java.util.List;

public interface BygAdminService extends IService<BygAdmin>, UserDetailsService {

    PageDataResDto<List<AdminResDto>> findAllAdmins(BygAdmin unitCode, PageInfo pageInfo);

    BaseResDto addAdmin(Integer unitId, AddAdminReqDto data);

    BaseResDto updPwd(Integer adminId, String oldPwd, String newPwd);

    BaseDataResDto<String> getCaptchaBase64();

    BaseResDto validateCaptcha(String code);

    BaseResDto editAdmin(Integer unitId, EditAdminResDto data);

    BaseResDto upDownAdmin(Integer adminId);

    BaseResDto checkAdmin(Integer adminId);

}
